<template>
    <el-tooltip class="box-item" :effect="effect" :content="content" :placement="placement">
        <el-button v-if="noButton" @bottonClick="bottonClick">{{ buttonTitle }}</el-button>
        <slot v-else/>
    </el-tooltip>
</template>

<script setup>
import { toRefs } from 'vue';

defineProps({
    effect: {
        type: String,
        default: 'dark'
    },
    content: {
        type: String,
        default: 'Top Left prompts info'
    },
    placement: {
        type: String,
        default: 'bottom-start'
    },
    buttonTitle: {
        type: String,
        default: '按钮'
    },
    noButton: {
        type: Boolean,
        default: true
    }
})

let emit = defineEmits(['bottonClick'])

const bottonClick = () => {
    emit('bottonClick')
}

let show = false
</script>